﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dashboard.aspx.cs" Inherits="dashboard" %>

<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="heb" dir="rtl">
<head id="Head1" runat="server">
    <link rel="shortcut icon" type="image/jpg" href="../images/logo/logo_feas.jpg" />
    <title>Real estate</title>
    <script src="../js/html5.js"></script>
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="../js/jquery-1.8.0.js"></script>
    <script type="text/javascript" src="../js/jquery-1.8.0.min.js"></script>
    <script src="../js/jquery.validationEngine-en.js" type="text/javascript"></script>
    <script src="../js/jquery.validationEngine.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/utility.js"></script>
    <script src="../js/jquery.min.js"></script>
    <script src="../js/bootstrap-modal.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/metro-bootstrap.css" />
    <link rel="stylesheet" href="../docs/font-awesome.css" />
    <!--<script type="text/javascript" src="../js/sticky_footer.js"></script>-->
    <link rel="stylesheet" type="text/css" href="../css/master.css" />
    <link rel="stylesheet" type="text/css" href="../css/dropBox.css" />
    <link rel="stylesheet" type="text/css" href="../css/menu.css" />
    <link rel="stylesheet" type="text/css" href="../css/tooltip.css" />
    <link rel="stylesheet" type="text/css" href="../css/buttons.css" />
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <link href="http://global-assetsgroup.com/en/admin/fullcalendar2/jquery-ui-1.7.3.custom.css"
        rel="stylesheet" type="text/css" />
    <link href="http://global-assetsgroup.com/en/admin/fullcalendar2/fullcalendar.css"
        rel="stylesheet" type="text/css" />
    <script src="../jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../jquery/jquery-ui-1.7.3.custom.min.js" type="text/javascript"></script>
    <script src="../jquery/jquery.qtip-1.0.0-rc3.min.js" type="text/javascript"></script>
    <script src="http://global-assetsgroup.com/en/admin/fullcalendar2/fullcalendar.min.js"
        type="text/javascript"></script>
    <script src="../scripts/calendarscript.js" type="text/javascript"></script>
    <script src="../jquery/jquery-ui-timepicker-addon-0.6.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">

        // Initialize version 1.0 of Google AJAX API
        google.load("language", "1");

        function translate(lang) {
            var source = document.getElementById("article").innerHTML;
            var len = content.length;

            // Google Language API accepts 500 characters per request 
            var words = 500;

            // This is for English pages, you can change the
            // sourcelang variable for other languages
            var sourcelang = "en";
            document.getElementById("translation").innerHTML = "";

            for (i = 0; i <= (len / words); i++) {
                google.language.translate(source.substr(i * words, words),
                 "en", lang, function (result) {
                     if (!result.error) {
                         document.getElementById("translation").innerHTML
           = document.getElementById("translation").innerHTML
           + result.translation;
                     }
                 });
            }

            // Hide the text written in the original language
            document.getElementById("article").style.display = 'none';
            return false;
        }

        // Switch to the original language

        function original() {
            document.getElementById("translation").style.display = 'none';
            document.getElementById("article").style.display = 'block';
            return false;
        }
    </script>
    <script type="text/javascript">

        $(document).ready(function () {


            $.countNewEmail();
        });
        $.countNewEmail = function () {

            $.post("notify.aspx", {

                requestFrom: "countNewEmail"
            },
function (data, status) {
    $("span#Email_info_count1").html(data);
});
        };
    </script>
    <style>
        #content
        {
            min-height: 950px;
            background-color: #FFFFFF;
            background-image: url(../images/bg/contentbg.png);
            min-width: 82%;
            margin-right: 221px;
            height: 100%;
            border-left-width: 0px;
            border-left-style: solid;
            border-left-color: #CCC;
        }
        #leftcolumn
        {
            float: right;
            width: 220px;
            margin-left: -100%;
            min-height: 1000px;
            background-color: #FFF;
            background-image: url(../images/bg/sidebarbg.png);
            border-left-width: 1px;
            border-left-style: solid;
            border-left-color: #CCC;
            height: 100%;
        }
        #titalbar
        {
            height: 47px;
            background-image: url('../images/bg/titalbar.png');
            background-repeat: repeat-x;
            border-bottom: 1px solid #CCC;
            width: 1160px;
        }
        #header
        {
            float: right;
            height: 75px;
            background-image: url('../images/bg/headbg.png');
            background-color: #FFF;
            border-bottom: 1px solid #CCC;
            width: 1380px;
        }
        #calendar
        {
            width: 210px;
            margin: 0px auto;
        }
        
        
        #footer
        {
            height: 32px;
            width: 100%;
            clear: both;
            background-color: #FFF;
            background-image: url('../images/bg/footerbg.png');
            border-top: 1px solid #CCC;
            border-bottom: 1px solid #CCC;
            text-align: center;
            font-size: 11px;
            padding-right: 270px;
        }
        
        .im
        {
            width: 900px;
            text-align: center;
            float: right;
            padding-right: 6.6%;
        }
        .foot
        {
            padding-left: 270px;
        }
        @media (min-width: 321px) and (max-width: 1024px)
        {
            .im
            {
                width: 900px;
                padding-right: 0%;
            }
        }
    </style>
</head>
<%
    int i;
%>
<body>
    <form id="form1" runat="server">
    <div id="wrapper">
        <asp:Label ID="Label5" runat="server" Text="Label" Visible="false"></asp:Label>
        <div id="header">
            <div style="float: left">
                <img src="http://global-assetsgroup.com/en/images/logo/logo_feas2.png" /></div>
            <img src="../images/logo/logo_feas.png" alt="Logo" style="margin-top: 7px; margin-left: 0px;
                float: right; padding-right: 40px;">
            <div id="metaphors" align="right">
                <li id="btnUser" style="display: none"><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label
                    ID="Label1" runat="server" Text="Label"></asp:Label><span class="arrow"></span></a></li>
                <div id="box3" class="outerbox">
                    <div id="box_inner3" class="innerbox">
                        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
                    </div>
                </div>
                <div id="box2" class="outerbox">
                    <div id="box_inner3" class="innerbox">
                        <div class="user_option">
                            <img src="../images/icons/user.png" class="opt_icon">alert</div>
                        <div class="user_option">
                            <img src="../images/icons/pencil.png" class="opt_icon">alert</div>
                    </div>
                </div>
                <div id="box1" class="outerbox">
                    <div id="box_inner1" class="innerbox">
                        <div class="user_option1">
                            <h4 class="opt_heading">
                                Menu Bar</h4>
                            <span id="show_menu" class="style">on</span><span id="hide_menu" class="style2">off</span></div>
                    </div>
                </div>
                <div id="box" class="outerbox">
                    <div id="box_inner" class="innerbox">
                        <div class="user_option">
                            <img src="../images/icons/user.png" class="opt_icon">Edit Profile</div>
                        <div class="user_option">
                            <img src="../images/icons/pencil.png" class="opt_icon">Change Password</div>
                    </div>
                </div>
            </div>
            <!--End of the metaphor tag-->
        </div>
        <!--End of the Header tag-->
        <div id="contentliquid">
            <div id="content">
                <div id="titalbar">
                    <a href="http://global-assetsgroup.com/hw/dashboard.aspx" style="font-size: 18px">
                        <img src="http://global-assetsgroup.com/en/admin/images/is.png" style="float: right;
                            display: none; padding-top: 10px; padding-left: 10px;" /></a>&nbsp; &nbsp;<a href="http://global-assetsgroup.com/en/admin/dashboard.aspx"
                                style="font-size: 18px">
                                <img src="http://global-assetsgroup.com/en/admin/images/us.jpg" style="float: right;
                                    display: none; padding-left: 10px; padding-top: 10px;" /></a>
                    <h1 style="font-size: 24px; color: #A00; padding-top: 10px; padding-bottom: 15px;
                        padding-left: 25px; float: left;">
                        Welcome Admin</h1>
                </div>
                <h2 style="font-size: 16px; color: #A00; padding-top: 2px; padding-bottom: 5px; padding-left: 25px">
                    <asp:Label ID="Label3" runat="server"></asp:Label></h2>
                <div align="center" style="margin-right: 70px">
                    <iframe align="center" src="../Admin_Module/Calendar.aspx" height="760" width="1000">
                    </iframe>
                </div>
                <div align="center">
                    <!-- Main Menu -->
                    <div align="center" class="im">
                        <img src="http://global-assetsgroup.com/images/global3.jpg" width="1000" height="209"
                            style="padding-right: 120px" /></div>
                </div>
            </div>
        </div>
        <div id="leftcolumn">
            <div id="leftcolumn_top">
                <h1 align="center" style="font-size: 20px; color: #000; padding-top: 15px; font-weight: bold">
                    <a href="http://global-assetsgroup.com/hw/dashboard.aspx" style="font-size: 18px">
                        <img src="http://global-assetsgroup.com/en/admin/images/is.png" /></a><a href="http://global-assetsgroup.com/en/admin/dashboard.aspx"
                            style="font-size: 18px">
                            <img src="http://global-assetsgroup.com/en/admin/images/us.jpg" /></a>
                </h1>
                <%  SqlConnection con = null;
                    con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString);
                    con.Open();
                    SqlCommand cmd = new SqlCommand("SELECT * FROM request5 where status1='0'", con);

                    SqlDataReader dr = cmd.ExecuteReader();
                    int i = 0;


                    while (dr.Read())
                    {

                        i = i + 1;

                        // Response.Write("<span style=\"border-bottom:1px solid #CCC;width:100%;padding:5px;\">");





                    }



                    dr.Close();
                    con.Close(); %>
                <%  SqlConnection con1 = null;
                    con1 = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString);
                    con1.Open();
                    SqlCommand cmd1 = new SqlCommand("SELECT * FROM message1 where status_='0'", con1);

                    SqlDataReader dr1 = cmd1.ExecuteReader();
                    int a = 0;


                    while (dr1.Read())
                    {

                        a = a + 1;

                        // Response.Write("<span style=\"border-bottom:1px solid #CCC;width:100%;padding:5px;\">");





                    }



                    dr1.Close();
                    con1.Close(); %>
                <%--   <div id="addtask" runclass="modal hide fade in" style="display: none; ">
        <div class="modal-header"> <a class="close" data-dismiss="modal">x</a>
          <h1 style="font-size:15px;padding:7px;font-weight:bold;">Notification's</h1>
        </div>
        <div class="modal-body">
        <table id="tbl_task" class="model_popup_desgin">
  <tr>
    <td><p> You have a recent&nbsp;&nbsp<%=i%>&nbsp;&nbsp;update on date</p></td>
  </tr>
  <tr>
     
   
  </tr>
  <tr>
      
  </tr>
  <tr>
    <td></td>
  </tr>
</table>

          
        </div>--%>
                <div id="addtask" class="modal hide fade in" style="display: none;">
                    <div class="modal-header">
                        <a class="close" data-dismiss="modal">x
                            <h1 style="font-size: 15px; padding: 7px; font-weight: bold;">
                                Updates</h1>
                    </div>
                    <div class="modal-body">
                        <table id="tbl_task" class="model_popup_desgin">
                            <tr>
                                <td>
                                    <p>
                                        You have a recent&nbsp;&nbsp<%=i%>&nbsp;&nbsp;update on date</p>
                                </td>
                            </tr>
                            <tr>
                            </tr>
                            <tr>
                            </tr>
                            <tr>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="modal-footer">
                        <asp:Button ID="Button2" runat="server" Text="cancel" CssClass="btn btn-success"
                            Visible="False" />
                        <asp:Button ID="Button1" runat="server" Text="View" CssClass="btn btn-success" OnClick="Button1_Click"
                            Visible="False" />
                        <p>
                            <a data-toggle="modal" href="#addtask1" class="btn btn-success" style="font-weight: bold;">
                                <img src="../images/icons/task.png" style="margin-right: 7px;" />View</a></p>
                    </div>
                </div>
                <div id="Div1" class="modal hide fade in" style="display: none;">
                    <div class="modal-header">
                        <a class="close" data-dismiss="modal">x</a>
                        <h1 style="font-size: 15px; padding: 7px; font-weight: bold;">
                            Notification's</h1>
                    </div>
                    <div class="modal-body">
                        <table id="Table1" class="model_popup_desgin">
                            <tr>
                                <td>
                                    <p>
                                        You have a recent&nbsp;&nbsp<%=a%>&nbsp;&nbsp;Messages</p>
                                </td>
                            </tr>
                            <tr>
                            </tr>
                            <tr>
                            </tr>
                            <tr>
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="modal-footer">
                        <asp:Button ID="Button5" runat="server" Text="cancel" CssClass="btn btn-success"
                            Visible="False" />
                        <asp:Button ID="Button6" runat="server" Text="View" CssClass="btn btn-success" OnClick="Button1_Click"
                            Visible="False" />
                        <p>
                            <a data-toggle="modal" href="#Div2" class="btn btn-success" style="font-weight: bold;">
                                <img src="../images/icons/task.png" style="margin-right: 7px;" />View</a></p>
                    </div>
                </div>
                <div id="addtask1" class="modal hide fade in" style="display: none;">
                    <div class="modal-header">
                        <a class="close" data-dismiss="modal">x</a>
                        <h1 style="font-size: 15px; padding: 7px; font-weight: bold;">
                            NotificationNotification's</h1>
                    </div>
                    <div class="modal-body">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource3"
                            CssClass="mGrid " OnRowCommand="GridView1_RowCommand">
                            <Columns>
                                <asp:BoundField DataField="r_id" HeaderText="Request ID" SortExpression="r_id" />
                                <asp:BoundField DataField="added" HeaderText="Added By" SortExpression="added" />
                                <asp:ButtonField ButtonType="Image" CommandName="active" HeaderText="View" ImageUrl="../images/icons/cross.png"
                                    Text="View" />
                            </Columns>
                        </asp:GridView>
                        <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:real_estateConnectionString %>"
                            SelectCommand="SELECT [r_id], [added] FROM [request5]  WHERE ([status1] = @status1) ">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="Label2" Name="status1" PropertyName="Text" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server"></asp:SqlDataSource>
                        <br />
                        <br />
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
                    </div>
                    <div class="modal-footer">
                        <asp:Button ID="Button3" runat="server" Text="cancel" CssClass="btn btn-success" />
                        <asp:Button ID="Button4" runat="server" Text="Done" CssClass="btn btn-success" OnClick="Button1_Click" /></div>
                </div>
                <div id="Div2" class="modal hide fade in" style="display: none;">
                    <div class="modal-header">
                        <a class="close" data-dismiss="modal">x
                            <h1 style="font-size: 15px; padding: 7px; font-weight: bold;">
                                Notification's</h1>
                    </div>
                    <div class="modal-body1">
                        <div style="margin-left: 80px;">
                            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">
                                <Columns>
                                    <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
                                    <asp:BoundField DataField="p_id" HeaderText="p_id" SortExpression="p_id" />
                                    <asp:BoundField DataField="ph_no" HeaderText="ph_no" SortExpression="ph_no" />
                                    <asp:BoundField DataField="address" HeaderText="address" SortExpression="address" />
                                    <asp:BoundField DataField="message" HeaderText="message" SortExpression="message" />
                                    <asp:BoundField DataField="date_" HeaderText="date_" SortExpression="date_" />
                                </Columns>
                            </asp:GridView>
                            <asp:Label ID="Label4" runat="server" Text="Label"></asp:Label>
                            <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:real_estateConnectionString %>"
                                SelectCommand="SELECT [email], [p_id], [ph_no], [address], [message], [date_] FROM [message1] WHERE ([status_] = @status_)">
                                <SelectParameters>
                                    <asp:ControlParameter ControlID="Label5" Name="status_" PropertyName="Text" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <asp:Button ID="Button7" runat="server" Text="cancel" CssClass="btn btn-success" />
                        <asp:Button ID="Button8" runat="server" Text="Done" CssClass="btn btn-success" OnClick="Button1_Click" /></div>
                </div>
            </div>
            <ul id="nav" style="text-align: right">
                <li><a href="dashboard.aspx" style="font-size: 20px">
                    <img src="../images/icons/home.png" class="menu_icon">Dashboard</a> </li>
                <li><a href="#" style="font-size: 20px">
                    <img src="http://global-assetsgroup.com/hw/images/1.png" width="150" height="50" /></a>
                    <ul>
                        <li><a href="searh_sell_property.aspx">
                            <img src="../images/icons/tabs.png" class="menu_icon">נכסים למכירה </a></li>
                        <li><a href="report_property_for_rent.aspx">
                            <img src="../images/icons/tabs.png" class="menu_icon">נכסים להשכרה</a></li>
                    </ul>
                </li>
                <li><a href="#" style="font-size: 20px">
                    <img src="http://global-assetsgroup.com/hw/images/2.png" width="150" height="50" /></a>
                    <ul>
                        <li><a href="search_property_torent.aspx">
                            <img src="../images/icons/tabs.png" class="menu_icon">לקוחות להשכרה</a></li>
                        <li><a href="search_buy_property.aspx">
                            <img src="../images/icons/tabs.png" class="menu_icon">לקוחות לקניה</a></li>
                    </ul>
                </li>
                <li><a href="#">
                    <img src="../images/icons/std2.png" class="menu_icon"><b>סוכן</b> </a>
                    <ul>
                        <li><a href="add_agent.aspx">
                            <img src="../images/icons/plus.png" class="menu_icon">Agent add</a></li>
                        <li><a href="deleteagent.aspx">
                            <img src="../images/icons/trash.png" class="menu_icon">Delete Agent</a></li>
                        <li><a href="agentreport.aspx">
                            <img src="../images/icons/pages.png" class="menu_icon">Agent Edit/Reports</a></li>
                    </ul>
                </li>
                <li><a href="admin_notes.aspx">
                    <img src="../images/icons/search.png" class="menu_icon"><b>משימות</b></a> </li>
                <li><a href="#">
                    <img src="../images/icons/id.png" class="menu_icon">פרטי חשבון</a>
                    <ul>
                        <li><a href="admin_account_information.aspx">
                            <img src="../images/icons/id.png" class="menu_icon">Update Account Details</a></li>
                    </ul>
                </li>
                <li><a href="messages1.aspx">
                    <img src="../images/icons/id.png" class="menu_icon"><b>הודעות</b></a> </li>
                <li style="margin-left: 10px; margin-top: 10px">
                    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                    </asp:ScriptManager>
                    <div id="calendar">
                    </div>
                    <div id="updatedialog" style="font: 70% 'Trebuchet MS', sans-serif; margin: 50px;"
                        title="Update or Delete Event">
                        <table cellpadding="0" class="style1">
                            <tr>
                                <td class="alignRight" style="visibility: visible">
                                    Name:
                                </td>
                                <td class="alignLeft" style="visibility: visible">
                                    <input id="eventName" type="text" readonly="readonly" /><br />
                                </td>
                            </tr>
                            <tr>
                                <td class="alignRight" style="visibility: visible">
                                    Description:
                                </td>
                                <td class="alignLeft" style="visibility: visible">
                                    <textarea id="eventDesc" cols="30" rows="3" readonly="readonly"></textarea>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div style="height: 250px">
                        &nbsp</div>
                    <div align="center">
                        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"><img src="http://global-assetsgroup.com/hw/images/logout.png" width="150" height="50" /></asp:LinkButton>
                        <li id="btnemail"></li>
                        <a data-toggle="modal" href="#addtask" id="btnemail" style="font-weight: bold; text-align: center">
                            <img src="http://global-assetsgroup.com/hw/images/update.png" width="150" height="50"
                                style="padding-right: 30px; margin-bottom: 0px;" /></a> <span id="Email_info_count1"
                                    class="info_count" title="Date Renew" rel="tooltip" style="display: none">
                        </span>
                    </div>
                    <div runat="server" id="jsonDiv" />
                    <input type="hidden" id="hdClient" runat="server" />
                </li>
            </ul>
        </div>
        <div id="footer">
            <p class="foot">
                Copyright &copy; 2013. Global-Assets-Group</p>
        </div>
    </form>
</body>
</html>
